<template>
  <div class="add-product">
    <div class="header">
      <div class="nav-bar">
        <p class="font16">添加产品</p>
        <router-link to="/product">
          <el-button class="back-btn">返回</el-button>
        </router-link>
      </div>
    </div>
    <div class="content">
      <router-view></router-view>
      <product-form v-if="!$route.name"></product-form>
    </div>
  </div>
</template>

<script>
import ProductForm from './product-form'

export default {
  components: {
    ProductForm
  },
  data() {
    return {
      // 页面数据
    }
  },
  methods: {
    // 方法
  }
}
</script>

<style scoped>
.add-product {
  padding: 20px;
  background-color: #fff;
}
.header {
  padding: 15px;
  padding-top: 30px;
}
.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.back-btn {
  margin-right: 40px;
  width: 100px;
  border-radius: 20px;
}
</style> 